Back to Push Button Object
Up to Table of Contents
Ahead to Text Objects

Radio Button Object

Use Radio Buttons to let the user choose between two or more mutually exclusive options. For example, your application can display three Radio Buttons to let the user choose one of three images they want to display. Use the Radio Button tool to draw a Radio Button object. The tool appears as follows:

Radio Button Appearance

The following figure shows an example of how a Radio Button might appear within Jamba.

Note that by default, a Radio Button is not checked. If you want the object to be checked by default, set its Checked property to True. (In keeping with Radio Button convention, make sure to set only one button in a group to be checked initially.) Use the Label property to control the text that appears in the object and use the Font property to control the character font and size. Use the TextColor property to control the color of the characters. The BackgroundColor property sets the color for the face of the object.

Interactivity

Typically, you set up Radio Buttons so that when the user clicks on a Radio Button to turn it on, the other Radio Buttons in the group automatically turn off. Then, the application can either take immediate action to reflect the user's choice, or the application can wait until the user clicks another button, such as an "OK" Push Button to evaluate the selection.

To make sure that Radio Buttons behave as a group, each object's To Do List should turn off the other Radio Buttons as soon as the user clicks. For example, consider an application with three Radio Buttons. RadioButton1's To Do List would appear as follows for the Click event:

The preceding To Do List turns off the other Radio Buttons as soon as the user clicks on RadioButton1. Similarly, the To Do List for RadioButton2 would appear as follows for the Click event:

The preceding To Do List turns off the other Radio Buttons as soon as the user clicks on RadioButton2.

Action Based on the Selection

If you want the application to take another action (besides turning off the other Radio Buttons) when the user clicks, simply add that item to the To Do List. For example, the following figure shows how the To Do List appears when the user clicks on RadioButton1 to first turn off the other Radio Buttons and then play an audio file.

Radio Button Properties, Methods, and Events

Radio Button objects support the following properties, methods, and events:

Properties Methods Events
BackgroundColor MoveAndSize() Click
Checked SlideTo() Create
Enabled
 
Hide
Font
 
Show
Height
 
SlideToComplete
HowToHide
 
 
HowToShow
 
 
Label
 
 
Name
 
 
TextColor
 
 
Visible
 
 
Width
 
 
X
 
 
Y
 
 

Back to Push Button Object
Up to Table of Contents
Ahead to Text Objects